// 	ID : pallab81
// 	PROG : 11790
// 	LANG : C++
// 	2011-08-27-20.35.09 Saturday
//
// 	"I have not failed, I have just found 10000 ways that won't work.
//


#include <iostream>
#include <algorithm>
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>

#include <ctime>
#include <cassert>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <climits>
#include <cstring>

using namespace std;

#define CI( x ) scanf("%d",&x)
#define CL( x ) scanf("%lld",&x)
#define CD( x ) scanf("%lf",&x )
#define fo(i,ed) for(int i = 0 ; i < ed ; ++i )
#define foit(i, x) for (typeof((x).begin()) i = (x).begin(); i != (x).end(); i++)
#define bip system("pause")
#define Int long long
#define pb push_back
#define SZ(X) (int)(X).size()
#define LN(X) (int)(X).length()
#define mk make_pair
#define f first
#define s second
#define SET( ARRAY , VALUE ) memset( ARRAY , VALUE , sizeof(ARRAY) )

inline void wait( double seconds ){
    double endtime = clock() + ( seconds*CLOCKS_PER_SEC );
    while( clock() < endtime ){;}
}
int n;
vector< int > w;
vector< int > v;
inline void Read(){
    CI(n);
    w.assign(n,0);
    v.assign(n,0);
    fo(i,n){
        CI(w[i]);
    }
    fo(i,n){
        CI(v[i]);
    }
}
inline int find_lis( ){
    vector<int> lis( n, 0 );
    fo(i,n){
        int var = v[i];
        fo(j,i){
            if( w[i] > w[j] ){
                var = max(var, lis[j]+v[i]);
            }
        }
        lis[i]=var;
    }
    int mx = lis[0];
    fo(i,n){
        mx = max( mx, lis[i]);
    }
return mx;
}
inline int find_lds(){
    vector<int> lds( n, 0 );
    fo(i,n){
        int var = v[i];
        fo(j,i){
            if( w[i] < w[j] ){
                var = max(var, lds[j]+v[i]);
            }
        }
        lds[i]=var;
    }
    int mx = lds[0];
    fo(i,n){
        mx = max( mx, lds[i]);
    }
return mx;
}


inline void Proc(int k){
    int a = find_lis();
    int b = find_lds();
    //cout<<a<<" "<<b<<"\n";
    printf("Case %d. ",k);
    if( a>=b ){
        printf("Increasing (%d). Decreasing (%d).\n",a,b);
    }
    else{
        printf("Decreasing (%d). Increasing (%d).\n",b,a);
    }

}
int main(){
    #ifndef ONLINE_JUDGE
        freopen("in.txt","rt",stdin);
    #endif

    int cases=1,i=1;
    for( CI(cases) ; cases ; --cases,++i ){
            Read();
            Proc(i);
    }
return 0;
}
